package com.springcloud.enums;

import java.util.HashMap;
import java.util.Map;

public enum LocationType {

    A0401("A01"),
    A0402("A02"),
    A0403("A03"),
    A0404("A04"),
    A0405("A05"),

    A0501("B01"),
    A0502("B02"),
    A0503("B03"),
    A0504("B04"),
    A0505("B05");
    LocationType(String pos){
        this.pos=pos;
    }
    private static final Map<String,LocationType> map;
    static {
        map=new HashMap<>();
        for (LocationType location:LocationType.values()){
            map.put(location.pos,location);
        }
    }
    private final String pos;
    public  static  boolean contain(String pos){
        return map.containsKey(pos);
    }
    public  static LocationType  getValue(String pos){
        return map.get(pos);
    }
}
